<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateItemsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('items', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('resume_id')->comment('简历id');
            $table->string('name',16)->comment('项目名称')->nullable();
            $table->string('url',60)->comment('项目url')->nullable();
            $table->string('role',12)->comment('项目角色')->nullable();
            $table->string('discription',1600)->comment('项目描述')->nullable();
            $table->string('harvest',1000)->nullable()->comment('项目业绩');
            $table->integer('start_date')->default(0)->comment('创建时间')->nullable();
            $table->integer('end_date')->default(0)->comment('创建时间')->nullable();
            $table->tinyInteger('status')->default(0)->comment('是否删除 1：是 0：否');
            $table->integer('created_at')->comment('创建时间');
            $table->integer('updated_at')->comment('最后更新时间');
        });
        DB::statement("ALTER TABLE `items` comment '项目经历表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('items');
    }
}
